<template>
    <component :is=component_name></component>
</template>
<script>
import HomeView from './HomeView.vue'
import ComponentView from './ComponentView.vue'
import ClusterView from './ClusterView.vue'
export default {
    components:{
        HomeView,
        ComponentView,
        ClusterView

    },
    name: "MainView",
    props: {
        viewType: String
    },
    data() {
        return {
            component_name: HomeView
        }
    },
    created() {
        if (this.viewType == "000") {
            this.component_name = HomeView
        } else if (this.viewType == "001") {
            this.component_name = ComponentView
        } else if (this.viewType == "002") {
            this.component_name = ClusterView
        }
    }
}
</script>
<style>
</style>